package com.csist.model;

import java.io.Serializable;
import java.sql.Date;

public class Message implements Serializable {
    private int sender;
    private String msg;
    private int receiver;
    private Date sendtime;
    private boolean state;
    public Message() {
    }

    public Message(int sender, String msg, int receiver, Date sendtime, boolean state) {
        this.sender = sender;
        this.msg = msg;
        this.receiver = receiver;
        this.sendtime = sendtime;
        this.state = state;
    }

    public int getSender() {
        return sender;
    }

    public void setSender(int sender) {
        this.sender = sender;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getReceiver() {
        return receiver;
    }

    public void setReceiver(int receiver) {
        this.receiver = receiver;
    }

    public Date getSendtime() {
        return sendtime;
    }

    public void setSendtime(Date sendtime) {
        this.sendtime = sendtime;
    }

    public boolean isState() {
        return state;
    }

    public void setState(boolean state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "Message{" +
                "sender=" + sender +
                ", msg='" + msg + '\'' +
                ", receiver=" + receiver +
                ", sendtime=" + sendtime +
                ", state=" + state +
                '}';
    }
}
